﻿using System;

namespace Sixeyed.CodeGeneration.Attributes
{
    /// <summary>
    /// Attribute specifying the metadata source type and Uri for a generated item
    /// </summary>
    [AttributeUsage(AttributeTargets.Class, AllowMultiple=false, Inherited=false)]
    public sealed class GeneratedCodeSourceAttribute : Attribute
    {
        private string _sourceType;
        private string _sourceUri;

        /// <summary>
        /// Source type name
        /// </summary>
        public string SourceType
        {
            get { return this._sourceType; }
        }

        /// <summary>
        /// Source Uri
        /// </summary>
        public string SourceUri
        {
            get { return this._sourceUri; }
        }

        /// <summary>
        /// Constructor with initial state
        /// </summary>
        /// <param name="sourceType">Source type name</param>
        /// <param name="sourceUri">Source Uri</param>
        public GeneratedCodeSourceAttribute(string sourceType, string sourceUri)
        {
            this._sourceType = sourceType;
            this._sourceUri = sourceUri;
        }
    }
}
